package com.ssm.demo.service.impl;

import com.ssm.demo.domain.TestDomain;
import com.ssm.demo.mapper.TestMapper;
import com.ssm.demo.service.ITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ZhuYouBin
 * @version 1.0.0
 * @Date: 2022/9/11 20:25
 * @Description
 */
@Service
public class TestService implements ITestService {

    @Autowired
    private TestMapper testMapper;

    public String test() {
        return "Spring框架整合.";
    }

    public void testMybatis() {
        List<TestDomain> query = testMapper.query();
        for (TestDomain testDomain : query) {
            System.out.println(testDomain);
        }
    }

}
